#ifndef _C_SKIP_LIST_H
#define _C_SKIP_LIST_H
#include "c_array.h"
typedef struct SkipListNode{
    SkipListNode* right;
    SkipListNode* next;
    int key;
}SKLNode;

typedef Array SkipListLevels;

typedef struct SkipList{
    SKLNode* head;
    unsigned int level;
    unsigned int size;
}SkipList;

SKLNode* ConstructSKLNode();
void DestructSKLNode(SKLNode* node);
SkipList* ConstructSkipList();
void DestructSkipList(SkipList* sp);
unsigned int GetSkipListDepth(SkipList* sp);
unsigned int GetSkipListSize(SkipList* sp);
bool Search(SkipList* sp,int key);
void Add(SkipList* sp,int key);
bool Erase(SkipList* sp,int key);

#endif